package com.liuyu.common.framework.rocketmq.status.service.impl;

import com.liuyu.common.framework.queue.model.QueueMessageWrapper;
import com.liuyu.common.framework.rocketmq.status.service.facade.MessageQueueProcessStatus;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * 消息处理类
 *
 * @author: liuyu
 * @date: 2024/9/6 10:31
 * @version: 1
 */
@Service
public class MessageQueueProcessStatusImpl implements MessageQueueProcessStatus {
    /**
     * 当前策略处理的主题和标签
     *
     * @return java.lang.String
     * @author liuyu
     * @date 2022/4/11 15:07
     */
    @Override
    public Set<String> getTopicTags() {
        return Set.of("default");
    }

    /**
     * 保存失败的消息
     *
     * @param queueMessageWrapper 包装类
     * @param exception           异常
     * @return boolean
     * @author liuyu
     * @date 2021/8/17 10:45
     */
    @Override
    public <T, V> boolean saveFailMessage(QueueMessageWrapper<T> queueMessageWrapper, Exception exception) {
        return false;
    }

    /**
     * 处理消息队列中的消息
     *
     * @param queueMessageWrapper
     * @return void
     * @author liuyu
     * @date 2021/8/17 11:20
     */
    @Override
    public <T> void processQueueMessage(QueueMessageWrapper<T> queueMessageWrapper) {

    }
}
